<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="assetMenu" />
<meta name="nav" content="0" />
<meta name="acc" content="_build"/>
<title>单位资质</title>
<!--  通用情况下 不引入 js css  表单验证  js 放置到页面中 -->
<%-- ui tabs --%>

<script type="text/javascript"
	src="<c:url value='/ext/ui/jquery-ui-1.8.12.custom.min.js'/>"></script>
<link href="${ctx}/styles/lightness/jquery-ui-1.8.12.custom.css"
	rel="stylesheet" />
<script>
	$(document).ready(
					function() {
						$("#addQualification").click(
							function() {
								var url = "${ctx}/project/org/qualification!input.action?organizationId=${organizationId}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}";
								var obj = new Object();
							    mm = showDialogWindow(url);
							    if (mm != null) {
							    		if ($.browser.msie) {
							    			document.getElementById("design").click();																	    		   
							    		}else{
											window.location.reload();										
							    		}
									}
							});
						$("#cloBtn").click(function(){
							window.close();
						});	
					});
				function accessQua(url){
					$.ajax({ url: url, context: document.body, dataType:'text', success: function(msg){
						if("1"==msg){
							if ($.browser.msie) {
				    			document.getElementById("design").click();																	    		   
				    		}else{
								window.location.reload();										
				    		}
						}else{
							alert("系统出错!");
						}
					}});					
				};	
				function updateQua(url){
						 mm = showDialogWindow(url);
						 if (mm != null) {
					    		if ($.browser.msie) {
					    			document.getElementById("design").click();																	    		   
					    		}else{
									window.location.reload();										
					    		}
							}
				}

</script>
</head>
<body>
<form action="construction!save.action" method="post" id="mainForm"
	class='yform'>
<div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul
	class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all ui-sortable">
		
	<c:if test="${typeId == '1' }">
	<li><a id="build" class="ui-state-default ui-corner-top "
		href="${ctx}/project/labs/build!input.action?projectId=${projectId}&contractKind=${typeId}&decorator=${param.decorator}&confirm=${param.confirm}">单位信息qweqwe</a></li>
	</c:if>
	<c:if test="${typeId != '1' }">
	<li><a id="build" class="ui-state-default ui-corner-top "
		href="${ctx}/project/labs/organization!input.action?id=${organizationId}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}&decorator=${param.decorator}&confirm=${param.confirm}">单位信息</a></li>
	</c:if>
	<li><a id="design"
		class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"
		href="${ctx}/project/labs/qualification.action?organizationId=${organizationId}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}&decorator=${param.decorator}&confirm=${param.confirm}">单位资质</a></li>
	<c:if test="${null!=projectId}">
		<li><a class="ui-state-default ui-corner-top "
			href="${ctx}/project/labs/department.action?deptId=${deptId}&projectId=${projectId}&typeId=${typeId}&organizationId=${organizationId}&decorator=${param.decorator}&confirm=${param.confirm}">部门设置</a></li>
		<li><a class="ui-state-default ui-corner-top "
			href="${ctx}/project/labs/userdepartment.action?organizationId=${organizationId}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}&decorator=${param.decorator}&confirm=${param.confirm}">人员情况</a></li>
	</c:if>
	<li><a id="labsequipment" class="ui-state-default ui-corner-top" href="${ctx}/project/labs/labsequipment.action?organizationId=${organizationId}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}&decorator=${param.decorator}&confirm=${param.confirm}">仪器设备</a></li>
	<li><a id="labsscope" class="ui-state-default ui-corner-top " href="${ctx}/project/labs/labsscope.action?organizationId=${organizationId}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}&decorator=${param.decorator}&confirm=${param.confirm}">业务范围</a></li>
</ul>
<table width="200" border="0" cellspacing="0" cellpadding="1">
	<tr>
		<th>证书等级</th>
		<th>证书编号</th>
		<th>发证机关</th>
		<th>发证时间</th>
		<th>操作</th>
	</tr>
	<c:forEach items="${page.result}" var="qualification"
		varStatus="qualificationNum">
		<tr>
			<td>${qualification.grade }</td>
			<td>${qualification.code}</td>
			<td>${qualification.certificate }</td>
			<td><fmt:formatDate value="${qualification.certificateDate}"
				pattern="yyyy-MM-dd" /></td>
			<td><a href="#" onclick="updateQua('qualification!input.action?id=${qualification.id}&organizationId=${organizationId}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}&decorator=${param.decorator}&confirm=${confirm}');">编辑</a>
			<a href="#" onclick="accessQua('qualification!deletQua.action?id=${qualification.id}&organizatinId=${organizatinId}&organizationId=${organizationId}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}');">删除</a>
			</td>
		</tr>
	</c:forEach>
</table>
</div>
<div class="type-button"><input id="addQualification"
	 type="button" class="submit" value="新增" /> 
	 <c:if test="${fn:length(param.decorator)!=0}">
	<input  type="button"
	value="返回" class="reset" onclick="history.back()"/>
	</c:if>
	<c:if test="${fn:length(param.decorator)==0}">
	<input id="cloBtn"  type="button"   value="关闭" class="reset" />
	</c:if>
	 </div>
</form>
</body>
</html>
